<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
//   async function fn() {
//     return 'aaa';
//   }
//
//   console.log(fn());
//   /*__proto__: Promise
// [[PromiseState]]: "fulfilled"
// [[PromiseResult]]: "aaa"*/
async function fn() {
  return new Promise((resolve, reject) => {
    resolve("success");
    reject("failed");
  });
}

let result = fn();
console.log(result);
/*
* __proto__: Promise
[[PromiseState]]: "fulfilled"
[[PromiseResult]]: "success"*/

result.then(value => {
  console.log(value);
})

</script>
</body>
</html>